package com.example.administrator.smartdevice.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.example.administrator.smartdevice.R;
import com.example.administrator.smartdevice.model.FunctionModel;

import java.util.List;

/**
 * Created by Administrator on 2018/1/22.
 */

public class HomePageFunctionAdapter extends BaseQuickAdapter<FunctionModel, BaseViewHolder> {
    public HomePageFunctionAdapter(int layoutResId, List data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, FunctionModel item) {
        helper.setImageResource(R.id.fragment_home_page_item_function_img_icon, item.getImageResource());
        helper.setText(R.id.fragment_home_page_item_function_tv_title, item.getTitle());
    }
}
